
const Reducer = (State = { initList: [], initSetList: [], List: [], total: 0, pingLunx: [], totals: 0, terLosi: [], ItemImg: [], SHixun: [], imassde: [] }, action) => {
    const newState = JSON.parse(JSON.stringify(State))
    switch (action.type) {
        case "INIT_INITLIST":
            newState.initList = action.data
            return newState
        case "INIT_INITLIST_SET":
            newState.initSetList = action.data
            return newState
        case "SZD_FXGC_HJLK":
            newState.total = action.total
            newState.List = action.data
            return newState
        case "PIN_GLUN_JIE_KOU"://获取项目详情评论接口的评论
            newState.totals = action.total
            newState.pingLunx = action.data
            return newState
        case "PIN_GLUN_JIE_KOU_VDFBFD"://获取指导老师的接口
            newState.terLosi = action.data
            newState.ItemImg = action.img
            newState.SHixun = action.xiangmu
            newState.imassde = action.imasgg
            return newState

        default:
            return State
    }
}
export default Reducer